        <link rel="stylesheet" href="<?php echo $ruta; ?>/css/reset.css" type="text/css" media="screen"/>
        <link rel="stylesheet" href="<?php echo $ruta; ?>/css/style_tabs.css" type="text/css" media="screen"/>
        <link rel="stylesheet" href="<?php echo $ruta; ?>/css/ui-darkness/jquery-ui-1.8.18.custom.css" type="text/css" media="screen"/>
        <link rel="stylesheet" href="<?php echo $ruta; ?>/css/ui.dropdownchecklist.standalone.css" type="text/css" media="screen"/>
        <link rel="stylesheet" href="<?php echo $ruta; ?>/css/ui.dropdownchecklist.themeroller.css" type="text/css" media="screen"/>
        <!--[if ! lte IE 6]><!-->
        <link rel="stylesheet" href="<?php echo $ruta; ?>/css/style.css" type="text/css" media="screen" />
        <!--<![endif]-->

        <!--[if gt IE 6]>
        <link rel="stylesheet" href="<?php echo $ruta; ?>/css/ie.css" type="text/css" media="screen" />
        <![endif]-->

        <!--[if IE 7]>
        <link rel="stylesheet" href="<?php echo $ruta; ?>/css/ie7.css" type="text/css" media="screen" />
        <![endif]-->

        <!--[if lte IE 6]>
        <link rel="stylesheet" href="http://universal-ie6-css.googlecode.com/files/ie6.1.1.css" media="screen, projection">
        <![endif]-->

        <link rel="stylesheet" href="<?php echo $ruta; ?>/css/fancybox.css" type="text/css" media="screen" />


        <!-- start scripts -->
        <script src="<?php echo $ruta; ?>/js/jquery-1.7.1.min.js"></script>
        <script src="<?php echo $ruta; ?>/js/jquery.cycle.all.min.js"></script>
        <script src="<?php echo $ruta; ?>/js/jquery.easing.1.3.js"></script>
        <script src="<?php echo $ruta; ?>/js/jquery.fancybox-1.3.4.pack.js"></script>
        <script src="<?php echo $ruta; ?>/js/custom.js"></script>
        <script src="<?php echo $ruta; ?>/js/general.js"></script>
        <script src="<?php echo $ruta; ?>/js/organictabs.jquery.js"></script>
        <script src="<?php echo $ruta; ?>/js/jquery-ui-1.8.18.custom.min.js"></script>

        <script src="<?php echo $ruta; ?>/js/jquery.ui.datepicker-es.js"></script>
        <script src="<?php echo $ruta; ?>/js/ui.dropdownchecklist-1.4-min.js"></script>

        <style type="text/css">
            .ui-autocomplete {
                max-height: 200px;
                overflow-y: auto;
                /* prevent horizontal scrollbar */
                overflow-x: hidden;
                /* add padding to account for vertical scrollbar */
                padding-right: 20px;
            }

            .ui-dropdownchecklist-text {
                color: #b70e4f;
                font-weight: bold;
            }        
        </style>

        <script type="text/javascript">
            $(function(){ 
                $(".datepicker").datepicker( $.datepicker.regional[ "es" ] );
                $( "#format" ).change(function() {
                    $( ".datepicker" ).datepicker( "option", "dateFormat", 'dd/mm/yyyy' );
                });
                var dates = $( "#datefrom, #dateto" ).datepicker({
                    changeMonth: true,
                    numberOfMonths: 1,
                    minDate: '+1d',
                    onSelect: function( selectedDate ) {
                        var option = this.id == "datefrom" ? "minDate" : "maxDate",
                        instance = $( this ).data( "datepicker" ),
                        date = $.datepicker.parseDate(
                        instance.settings.dateFormat ||
                            $.datepicker._defaults.dateFormat,
                        selectedDate, instance.settings );
                        date.setDate(date.getDate()+1);
                        dates.not( this ).datepicker( "option", option, date );
                    }
                });
                var count_playa = 0;
                var count_ciudad = 0;
                var count_rural = 0;
                var count_nieve = 0;
                $("#enlace_mapa").click(function(){
                    $.ajax({
                        type: "POST",
                        url: '<?php echo site_url('reserva/mapa'); ?>',
                        data: {},
                        success: function(datos){
                            alert(datos);
                            $('#map_canvas').html(datos);
                        }
                    });
                });
                $("#img_playa").click(function(){
                    $(this).toggleClass("borde-lila");
                    count_playa++;
                    if(count_playa % 2 == 1){
                        $("#p_entorno_playa").val("S");
                        $("#p_entorno_ciudad").val("N");
                        $("#p_entorno_rural").val("N");
                        $("#p_entorno_nieve").val("N");
                    }else{
                        $("#p_entorno_playa").val("N");
                    }
                });
                $("#img_ciudad").click(function(){
                    $(this).toggleClass("borde-lila");
                    count_ciudad++;
                    if(count_ciudad % 2 == 1){
                        $("#p_entorno_ciudad").val("S");
                        $("#p_entorno_playa").val("N");
                        $("#p_entorno_rural").val("N");
                        $("#p_entorno_nieve").val("N");
                    }else{
                        $("#p_entorno_ciudad").val("N");
                    }
                });
                $("#img_rural").click(function(){
                    $(this).toggleClass("borde-lila");
                    count_rural++;
                    if(count_rural % 2 == 1){
                        $("#p_entorno_rural").val("S");
                        $("#p_entorno_playa").val("N");
                        $("#p_entorno_ciudad").val("N");
                        $("#p_entorno_nieve").val("N");
                    }else{
                        $("#p_entorno_rural").val("N");
                    }
                });
                $("#img_nieve").click(function(){
                    $(this).toggleClass("borde-lila");
                    count_nieve++;
                    if(count_nieve % 2 == 1){
                        $("#p_entorno_nieve").val("S");
                        $("#p_entorno_playa").val("N");
                        $("#p_entorno_ciudad").val("N");
                        $("#p_entorno_rural").val("N");
                    }else{
                        $("#p_entorno_nieve").val("N");
                    }
                });
                
                $('#enlace_mapa').click(function(){
                    var idproducto = $('#idproducto').val();
                    var descproducto = $('#descproducto').val();

                    $('#div_cargando').html("<img src='<?php echo base_url();?>public/images/ajax-loader.gif'/>");
                    $.ajax({
                        type: "POST",
                        url: '<?php echo site_url('front/reserva/get_map');?>',
                        data: {'producto' : idproducto, 'descripcion' : descproducto, 'echo_o_return' : 'echo'},
                        success: function(datos){
                            $('#div_cargando').html('');
                            $('#div_mapa').css('display', 'block');
                            $('#div_mapa').html(datos);
                            
                            initialize_map();
                        }
                    });
                });
            });

            $(document).ready(function() {
                $("#p_lugares").css("display","inline");
                $("#p_lugares").dropdownchecklist( {
                    icon: {}, 
                    width: 250, 
                    emptyText: '<?php echo lang('por_favor_seleccione'); ?>', 
                    maxDropHeight: 200,
                    onComplete: function(selector) {
                        var values = "";
                        for( i=0; i < selector.options.length; i++ ) {
                            if (selector.options[i].selected && (selector.options[i].value != "")) {
                                if ( values != "" ) values += ",";
                                values += selector.options[i].value;
                            }
                        }
                        $("#p_valores_lugares").val(values);
                    } 
                } );
                if($("#p_entorno_nieve").val() == 'S'){$("#img_nieve").toggleClass("borde-lila");}
                if($("#p_entorno_playa").val() == 'S'){$("#img_playa").toggleClass("borde-lila");}
                if($("#p_entorno_ciudad").val() == 'S'){$("#img_ciudad").toggleClass("borde-lila");}
                if($("#p_entorno_rural").val() == 'S'){$("#img_rural").toggleClass("borde-lila");}
            });


        </script>

<!--[if IE]> <script src="<?php echo $ruta; ?>/js/selectivizr.js"></script> <![endif]-->
        <!-- end scripts -->
